home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- DreamDoor.library/InitDoor
- DreamDoor.library/CloseDoor
- DreamDoor.library/SendString
- DreamDoor.library/Prompt
- DreamDoor.library/InquirePointers
- DreamDoor.library/DisplayFile
- DreamDoor.library/YesNo
- DreamDoor.library/ScanUserbase
- DreamDoor.library/UpdateStructures
- DreamDoor.library/XprSend
- DreamDoor.library/XprReceive
- DreamDoor.library/GetLrp
- DreamDoor.library/SetLrp
- DreamDoor.library/GetKey
- DreamDoor.library/ScanFileDirs
- DreamDoor.library/FlagFile
- DreamDoor.library/Disconnect
- DreamDoor.library/DDCommand
- DreamDoor.library/ResetIdle
- DreamDoor.library/Relogin
- DreamDoor.library/JoinConference
- DreamDoor.library/ChangeMsgBase
- DreamDoor.library/IntCommand
- DreamDoor.library/CheckKey
- DreamDoor.library/LineEditor
- DreamDoor.library/InitDoor
-
- NAME
- InitDoor - Initialize door
-
- SYNOPSIS
- dif = InitDoor(node)
- D0 A0
-
- struct DIFace *InitDoor(char *)
-
- FUNCTION
- Allocates all required structures, ports and messages. You should
- call this at the beginning of door.
-
- EXAMPLE
- InitDoor(argv[1]);
-
- INPUTS
- node - The ASCII (!!) value of the node number.
-
- RESULT
- dif - Ptr to an initialized DIFace structure or NULL if
- DayDream's doorport isn't open.
-
- SEE ALSO
- CloseDoor
- DreamDoor.library/CloseDoor
-
- NAME
- CloseDoor - Shutdown door and delete messages, ports and DIFace.
-
- SYNOPSIS
- CloseDoor(dif)
- D0
-
- void CloseDoor(struct DIFace *);
-
- FUNCTION
- You *MUST* call this function to close door. This deletes all
- structures created by InitDoor() and tells DayDream that door
- has finished it's job.
-
- NOTE
- This call will close the doorport, so you won't be able to send
- cmd's to DayDream anymore, but the door can still do other tasks.
- So it is NOT necessary to quit right after doing a CloseDoor()
- call!
-
- !!IMPORTANT!!
- It is *NOT* possible to re-initialise door by calling InitDoor()
- after doing CloseDoor()
-
- EXAMPLE
- CloseDoor(dif);
-
- INPUTS
- dif - A pointer to the DIFace structure returned by InitDoor()
-
- SEE ALSO
- InitDoor
-
- DreamDoor.library/SendString
-
- NAME
- SendString - Type String
-
- SYNOPSIS
- SendString(dif, string)
- D0 A0
-
- void SendString(struct DIFace *, char *);
-
- FUNCTION
- Prints specified string of characters to remote user's display,
- local screen or both. Possible ANSI codes will be automatically
- stripped, if user has chosen an ASCII display mode. When in need
- of changing line, string only needs to contain a linefeed, carriage
- return (ASCII 13) will be inserted automatically.
-
- EXAMPLE
- SendString(dif,"Hello World!");
-
- INPUTS
- dif - A pointer to the DIFace structure returned by InitDoor()
- string - A pointer to the null-terminated string containing text
- to print.
-
- DreamDoor.library/Prompt
-
- NAME
- Prompt - Prompt for user input
-
- SYNOPSIS
- success = Prompt(dif, buffer, length, flags, default)
- D0 D0 A0 D1 D2 D3
-
- int Prompt(struct DIFace *, char *, ULONG, ULONG, char *)
-
- FUNCTION
- Prompts user to enter a string. Length will be restricted as
- requested by the door. Full support for ANSI cursor sequences
- is given, so that user can easily move through the string and
- modify as required.
-
- EXAMPLE
- stat = Prompt(dif,GSTR,13,DPF_FILENAME,"Marsu jee!");
-
- INPUTS
- dif - A pointer to the DIFace structure returned by InitDoor()
- buffer - Pointer to the buffer, where the final string will be
- inserted.
- length - Maximum length
- flags - DPF_HIDDEN = Hidden mode, print *'s instead of real chars.
- DPF_NOCRLF = Don't print CR+LF after receiving result code.
- DPF_FILENAME = Don't allow any chars illegal in filenames.
- default - Default string or NULL
-
- RESULT
- success - 0L if carrier lost, 1L if successfull.
-
- DreamDoor.library/InquirePointers
-
- NAME
- InquirePointers - Inquire Structure Pointers
-
- SYNOPSIS
- InquirePointers(dif, pointers)
- D0 D0 A0
-
- void InquirePointers(struct DIFace *, struct DDPointers *)
-
- FUNCTION
- This command will return with pointers to several significant
- system structures, such as user structure etc.
- Be careful when editing stuff in those pointers, because DayDream
- uses same memoryblocks! You can also find out with this function
- if DayDream is in local mode.
-
- EXAMPLE
- InquirePointers(d,pointermem);
-
- NOTE
- _NEVER_ use these pointers after DayDream has closed it's Doorport!
-
- INPUTS
- dif - A Pointer to DIFace returned by InitDoor()
- pointers - A pointer to allocated memoryblock where the pointers
- are placed.
-
- DreamDoor.library/DisplayFile
-
- NAME
- DisplayFile - Display ANSI of ASCII-file
-
- SYNOPSIS
- DisplayFile(dif, filename, flags)
- D0 A0 D1
-
- void DisplayFile(struct DIFace *, char *, ULONG)
-
- FUNCTION
- This command outputs an ASCII or ANSI file into remote terminal,
- local screen or both.
-
- EXAMPLE
- DisplayFile(d,"s:user-startup",DDF_SHOWERROR);
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- filename - A pointer to the filename to show.
- flags - DDF_ADDEXTENSION = automatically add .GFX/.TXT.
- DDF_SHOWERROR = In case file couldn't be found, show a
- visible error message instead of quiting
- quietly.
-
- DreamDoor.library/YesNo
-
- NAME
- YesNo - Prompt user for simple yes or no
-
- SYNOPSIS
- result = YesNo(dif,default)
- D0 d0 d1
-
- int YesNo(struct DIFace *, ULONG);
-
- FUNCTION
- This function asks user to answer a simple yes or no question.
- Door program must type the question by itself, since all this
- function outputs is an ASCII string "Yes" or "No" based on the
- user's answer.
-
- EXAMPLE
- poro = YesNo(d,DYESNO_NO);
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- default - Default answer. 1 = Yes, 0 = No.
-
- RESULT
- result - 0 = No, 1 = Yes, -1 = Carrier lost.
-
- DreamDoor.library/ScanUserbase
-
- NAME
- ScanUserbase - Scan Userbase for Scecified User Account
-
- SYNOPSIS
- offset = ScanUserbase(dif, name)
- D0 D0 A0
-
- LONG ScanUserbase(struct DIFace *, char *);
-
- FUNCTION
- This function scans user database (UserBase.DAT) in order to find
- the specified account. Match can be made in real name or handle.
- Operation is fully non-case-sensitive.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- name - A Pointer to the Handle or Name to user to be scanned.
-
- RESULT
- offset - An offset to the matching account. -1 if account not
- found.
-
- DreamDoor.library/UpdateStructures
-
- NAME
- UpdateStructures - Update DayDream Data Structures
-
- SYNOPSIS
- UpdateStructures(dif)
- D0
-
- void UpdateStructures(struct *DIFace);
-
- FUNCTION
- This function must be called after any DayDream structure has
- been modified. Please remember to observe extreme cautiousness,
- since careless modifications will lead to a system crash.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
-
- DreamDoor.library/XprSend
-
- NAME
- XprSend - Send file(s) w/ Xpr-Protocol.
-
- SYNOPSIS
- XprSend(dif, files, default path)
- D0 A0 A1
-
- void XprSend(struct *DIFace, char *, char *);
-
- FUNCTION
- This function allows door to send file(s) to user using currently
- selected XPR-Protocol.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- files - Pointer to a data block, consisting of NULL-terminated to
- be transferred. End of the block will be signaled with a $FF
- (Byte).
- default path - Pointer to a valid AmigaDOS pathname. Files with no
- path spec will be looked for in this directory.
-
- DreamDoor.library/XprReceive
-
- NAME
- XprReceive - Receive file(s) w/ Xpr-Protocol
-
- SYNOPSIS
- XprReceive(dif, path)
- D0 A0
-
- void XprReceive(struct *DIFace, char *);
-
- FUNCTION
- This function allows door to receive files from user using currently
- selected XPR-Protocol.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- path - path to receive files.
-
- DreamDoor.library/GetLrp
-
- NAME
- GetLrp - Gets last read pointer from specified message base.
-
- SYNOPSIS
- result = GetLrp(dif, conf, base)
- D0 D0 D1 D2
-
- ULONG *GetLrp(struct *DIFace, ULONG, ULONG);
-
- FUNCTION
- Gets last read pointer of current user from specified message base.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- conf - Conference number
- base - Message base number
-
- RESULT
- result - Last read pointer is returned.
-
- DreamDoor.library/SetLrp
-
- NAME
- SetLrp - Sets last read pointer
-
- SYNOPSIS
- SetLrp(dif, conf, base, lrp)
- D0 D1 D2 D3
-
- void SetLrp(struct *DIFace, ULONG, ULONG, ULONG);
-
- FUNCTION
- Gets last read pointer of current user to specified message base.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- conf - Conference number
- base - Message base number
- lrp - New Last read pointer
-
- DreamDoor.library/GetKey
-
- NAME
- GetKey - Gets a character from local console or remote terminal
-
- SYNOPSIS
- result = GetKey(dif, flags)
- D0 D0 D1
-
- ULONG *GetKey(struct *DIFace, ULONG);
-
- FUNCTION
- This function simply waits for a single keypress from either the
- local console or remote terminal. After receiving a character,
- this function will immediately return with no further activity.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- flags - currently understands these flags:
- HOTKEY_SHOWCHAR - Show pressed character
- HOTKEY_ADDLF - Insert CRLF after received character
- HOTKEY_CURSOR - Check for cursor keys (250=up etc)
-
- RESULT
- result - NULL if carrier lost or received character
-
- DreamDoor.library/ScanFileDirs
-
- NAME
- ScanFileDirs - Vittu tän kans palaa taulu!
-
- SYNOPSIS
- result = ScanFileDirs(dif, conf, pattern, hook, userdata)
- D0 D0 D1 A0 A1 A2
-
- ULONG *ScanFileDirs(struct *DIFace, ULONG, char *, APTR, ULONG);
-
- FUNCTION
- This function will scan all the file directories in the specified
- conference and see if any of the files matches with given string;
- wildcards allowed, of course. When a match is found, this routine
- will call a hook routine with path, name and size of the file
- as it's parameters allowing it to process the file in any wanted
- way. After the hook has returned, scanning will or will not be
- continued depending on whether the search string contained any
- wildcards (if it didn't, no more than one match is possible).
- If hook is null, internal fileflagging hook of DayDream will be
- used.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- conf - Conference number
- pattern - Pointer to the search string, wildcards allowed.
- hook - Pointer to the hook routine to call:
-
- Hook(Path, Filename, Size, UserData);
- A0 A1 D0 D1
-
- >WARNING< HOOK ROUTINE MAY ABSOLUTELY NOT
- MODIFY ANY SYSTEM REGISTERS UNLESS THE
- ORIGINAL VALUES ARE RETURNED BEFORE EXIT!
-
- If this is NULL, use File tagging-routines of DayDream.
- userdata - User data variable - will be given to Hook() routine
- as provided here. This will just pass through DD and
- doesn't have any effect on DD's operation. With this
- field you can easily pass some data to your hook.
-
- NOTE
- You may not call functions using DIF when in hook.
-
- RESULT
- result - 0 - Operation successful
- 1 - Not enough memory (only 2048 bytes needed)
- 2 - Specified conference not found
- 3 - Specified conference doesn't have any file directories
-
- DreamDoor.library/FlagFile
-
- NAME
- FlagFile - Add file to the download request
-
- SYNOPSIS
- result = FlagFile(dif, path, file, flags, size)
- D0 D0 A0 A1 D1 D2
-
- ULONG = FlagFile(struct *DIFace, char *, char *, ULONG, ULONG);
-
- FUNCTION
- This function will add a file to the download request. Current dload
- request will be checked first to avoid possible duplicate entries.
- If no duplicate entry or other errors occurred, file will be added
- to the filechain.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- path - Pointer to the path where the file to be added can be
- found. PATH MUST END WITH A SLASH ('/') OR COLON (':')!
- file - pointer to the actual filename
- flags - FLAGFILE_FREE if file is a free download
- size - Size of the file.
-
- RESULT
- result - 0 - Operation successful
- 1 - Duplicate entry found
- 2 - File ratio problems
- 3 - Byte ratio problems
- 4 - Not enough memory
-
- DreamDoor.library/Disconnect
-
- NAME
- Disconnect - Kick some ass
-
- SYNOPSIS
- Disconnect(dif)
- D0
-
- void Disconnect(struct *DIFace);
-
- FUNCTION
- This function will disconnect user from BBS.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
-
- DreamDoor.library/DDCommand
-
- NAME
- DDCommand - Run DayDream Command
-
- SYNOPSIS
- DDCommand(dif, command)
- D0 A0
-
- void DDCommand(struct *DIFace, char *);
-
- FUNCTION
- Allows use of DayDream's commands (also external ones)
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- command - Command to be executed.
-
- DreamDoor.library/ResetIdle
-
- NAME
- ResetIdle - Resets idle counter
-
- SYNOPSIS
- ResetIdle(dif)
- D0
-
- void ResetIdle(struct DIFace *);
-
- FUNCTION
- This function will reset the idle-counter. Useful for doors
- having own serial/console routines, before and after archiving
- something etc. Note that hotkey, prompt etc. routines reset
- the idle counter automatically.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
-
- DreamDoor.library/Relogin
-
- NAME
- Relogin - VITTU SE ON JUST NIINKU SE ON! HAHA!
-
- SYNOPSIS
- Relogin(dif)
- D0
-
- void Relogin(struct DIFace *);
-
- FUNCTION
- Same as CloseDoor(), except this will relogin user to the
- system.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
-
-
- DreamDoor.library/JoinConference
-
- NAME
- JoinConference - Joins specified Conference
-
- SYNOPSIS
- JoinConference(dif, conf, flags)
- D0 D1 D2
-
- void JoinConference(struct DIFace *, ULONG, ULONG);
-
- FUNCTION
- Joins specified conference.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- conf - number of conference to join
- flags - JOINCONFF_ASKNEW - Ask new conference if requested conference
- doesn't exist
- JOINCONFF_QUICK - Do not load any conference specific data
- etc. If you use this, you must join back
- to the original conference before quitting
- door.
- JOINCONFF_SKIPTXT - Skip JoinConference.TXT|GFX
-
- DreamDoor.library/ChangeMsgBase
-
- NAME
- ChangeMsgBase - Change current message base
-
- SYNOPSIS
- ChangeMsgBase(dif, base, flags)
- D0 D1 D2
-
- void ChangeMsgBase(struct DIFace *, ULONG, ULONG);
-
- FUNCTION
- This function changes the current msg base.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- base - number of base to enter
- flags - CBMF_SHOWMENU - Show menu if base = 0
- CBMF_NOSTATUS - Do not display msgbase status
-
- DreamDoor.library/IntCommand
-
- NAME
- IntCommand - Run internal DayDream Command
-
- SYNOPSIS
- DDCommand(dif, command)
- D0 A0
-
- void DDCommand(struct *DIFace, char *);
-
- FUNCTION
- Allows use of DayDream's commands (only internals)
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- command - Command to be executed.
-
- DreamDoor.library/CheckKey
-
- NAME
- CheckKey - Gets a character from local console or remote terminal
-
- SYNOPSIS
- result = CheckKey(dif)
- D0 D0
-
- ULONG *CheckKey(struct *DIFace, ULONG);
-
- FUNCTION
- Checks if there's character in receive buffer and if so, returns
- it.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
-
- RESULT
- result - NULL if nothing or received character
-
- DreamDoor.library/LineEditor
-
- NAME
- LineEditor - Edit file using DD's built-in line editor.
-
- SYNOPSIS
- LineEditor(dif, file)
- D0 D1
-
- void LineEditor(struct *DIFace, char *);
-
- FUNCTION
- Edit and create text file using DD's built-in line editor.
-
- INPUTS
- dif - A Pointer to the DIFace returned by InitDoor()
- file - Pointer to the filename to edit
-
-